using System;
using System.Collections.Generic;
using System.Text;
using Shc.Sql;
using Shc.Json;
namespace Slqj.Data
{
	public static class TableViewTopTicketsID
	{
		public const string Table = "View_TopTicketsID";
		public const string AttractionsID = "AttractionsID";
		public const string TicketsID = "TicketsID";
	}
	
	[Serializable]
	public class BaseViewTopTicketsID
		: IDbSessionEntity, IJsonClass
	{
		int m_AttractionsID;
		/// <summary>
        /// 
        /// </summary>
        public int AttractionsID
        {
            get { return m_AttractionsID; }
            set { m_AttractionsID = value; }
        }
		
		int? m_TicketsID;
		/// <summary>
        /// 
        /// </summary>
        public int? TicketsID
        {
            get { return m_TicketsID; }
            set { m_TicketsID = value; }
        }
		
		
		#region IDbSessionEntity Members
		public void ReadDBData(RowDataReader reader)
        {
            m_AttractionsID = reader[TableViewTopTicketsID.AttractionsID];
            m_TicketsID = reader[TableViewTopTicketsID.TicketsID];
        }
		
		public void WriteDBData(RowDataWriter writer)
        {
        }

        public void SetIdentityAfterInsert(DBObject idd)
        {
        }
		
		public string TableName
        {
            get { return TableViewTopTicketsID.Table; }
        }
		#endregion
		
		
		#region IJsonClass Members

        public void JsonDeSerializeObj(JsonHashTable hashToRead)
        {
             m_AttractionsID = hashToRead["AttractionsID"];
			 
             m_TicketsID = hashToRead["TicketsID"];
			 
        }

        public void JsonSerializeObj(JsonHashTable hashToFill)
        {
            hashToFill["AttractionsID"] = AttractionsID;
			
            hashToFill["TicketsID"] = TicketsID;
			
        }

        #endregion
		
	}
}
